package com.undsf.despot.modles;

/**
 * Created by Arathi on 2016/10/5.
 */
public class Skill {
    public static final int EFFECT_TYPE_MASK_DAMAGE = 0x01;  // 00000001 伤害
    public static final int EFFECT_TYPE_MASK_HEAL = 0x02;    // 00000010 回复
    public static final int EFFECT_TYPE_MASK_BUFF = 0x04;    // 00000100 状态
    public static final int EFFECT_TYPE_MASK_DISPEL = 0x08;    // 00001000 驱散

    protected Identify64 id;
    protected Identify64 parent;
    protected String name;
    protected String spell;
    protected int costMp;
    protected Identify64 buff;
    protected int targetType;
    protected int effectType;
    protected String castDescription;
    protected int damageMin;
    protected int damageMax;
    protected int healMin;
    protected int healMax;
    protected String description;
    protected boolean active;
    protected double amendment;
    protected String property;

    public String getActionDescription() {
        return castDescription;
    }

    public int getTargetType() {
        return targetType;
    }

    public boolean isDamageSkill() {
        return (effectType & EFFECT_TYPE_MASK_DAMAGE) != 0;
    }

    public boolean isHealSkill() {
        return (effectType & EFFECT_TYPE_MASK_HEAL) != 0;
    }

    public boolean isBuffSkill() {
        return (effectType & EFFECT_TYPE_MASK_BUFF) != 0;
    }

    @Override
    public String toString() {
        return id+" "+name;
    }

    // ------------

    public int getCostMp() {
        return costMp;
    }

    public int getDamageMin() {
        return damageMin;
    }

    public int getDamageMax() {
        return damageMax;
    }

    public int getHealMin() {
        return healMin;
    }

    public int getHealMax() {
        return healMax;
    }

    public Identify64 getBuff() {
        return buff;
    }

    public void setId(Identify64 id) {
        this.id = id;
    }

    public void setParent(Identify64 parent) {
        this.parent = parent;
    }

    public void setSpell(String spell) {
        this.spell = spell;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setCostMp(int costMp) {
        this.costMp = costMp;
    }

    public void setBuff(Identify64 buff) {
        this.buff = buff;
    }

    public void setTargetType(int targetType) {
        this.targetType = targetType;
    }

    public void setEffectType(int effectType) {
        this.effectType = effectType;
    }

    public void setCastDescription(String castDescription) {
        this.castDescription = castDescription;
    }

    public void setDamageMax(int damageMax) {
        this.damageMax = damageMax;
    }

    public void setDamageMin(int damageMin) {
        this.damageMin = damageMin;
    }

    public void setHealMin(int healMin) {
        this.healMin = healMin;
    }

    public void setHealMax(int healMax) {
        this.healMax = healMax;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Identify64 getId() {
        return id;
    }

    public Identify64 getParent() {
        return parent;
    }

    public String getName() {
        return name;
    }

    public String getSpell() {
        return spell;
    }

    public int getEffectType() {
        return effectType;
    }

    public String getCastDescription() {
        return castDescription;
    }

    public String getDescription() {
        return description;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public double getAmendment() {
        return amendment;
    }

    public void setAmendment(double amendment) {
        this.amendment = amendment;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }
}
